package bean;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Entity
@Table(name="Movimiento")
public class Movimiento implements Serializable {

	private static final long serialVersionUID = 1L;
	
	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	@Column (name= "idMovimiento", nullable=false)
	private int id;
	
	@Column (nullable=false)
	private Date fechaIngreso;
	
	@Column (nullable=true)
	private Date fechaEgreso;
	
	@ManyToOne
	@JoinColumn(name = "idSecretaria", nullable=false)
	private Secretaria secretaria;
	
	@ManyToOne
	@JoinColumn(name = "idEmpleadoDestino", nullable=false)
	private Empleado empleadoDestino;
}
